import { createRouter, createWebHistory } from 'vue-router';
import MainLayout from '../layouts/MainLayout.vue';
import ProblemGenerator from '../components/ProblemGenerator.vue';
import ProblemScanner from '../components/ProblemScanner.vue';
import ResultAnalysis from '../components/ResultAnalysis.vue';
import LoginView from '../views/LoginView.vue';
import RegisterView from '../views/RegisterView.vue';

const router = createRouter({
  history: createWebHistory('/landi/math-practice/'),
  routes: [
    {
      path: '/',
      component: MainLayout,
      children: [
        {
          path: '',
          name: 'home',
          component: ProblemGenerator
        },
        {
          path: 'scanner',
          name: 'scanner',
          component: ProblemScanner
        },
        {
          path: 'analysis',
          name: 'analysis',
          component: ResultAnalysis
        }
      ]
    },
    {
      path: '/login',
      name: 'login',
      component: LoginView
    },
    {
      path: '/register',
      name: 'register',
      component: RegisterView
    }
  ]
});

export default router; 